<h3>Dokument / File</h3>
<?php foreach ($access->result() as $a): ?>
    <?php echo get_add($a->document_add, 'documents/add/') ?>
<?php endforeach ?>

<?php if ($this->uri->segment(3) == 'successfully'): ?>
    <?php echo "Delete Successfully" ?>
<?php endif ?>

<table class="data">
    <tr class="data">
        <th class="data" width="30px">No</th>
        <th class="data" width="100px">Judul</th>
        <th class="data" width="">Nama Document / File</th>
        <th class="data" width="100px">Aksi</th>
    </tr>
    <?php foreach ($rows->result() as $document): ?>
        <tr class="data">
            <td class="data" width="30px"><?php echo $i ?></td>
            <td class="data"><?php echo $document->title ?></td>
            <td class="data"><?php echo $document->file ?></td>
            <td class="data" width="75px">
        <center>
            <a href="<?php echo base_url() . 'documents/download/' . $document->file ?>"><img src="<?php echo base_url() ?>img/detail.png"></a>&nbsp;&nbsp;
            <?php foreach ($access->result() as $a): ?>
                    <?php echo get_edit($a->document_edit, 'documents/edit/', $document->id) ?>&nbsp;&nbsp;
                <?php // echo get_delete($a->document_delete, 'documents/delete/', $document->id . '=' . $document->file) ?>&nbsp;&nbsp;
                <?php $image = "<img src=" . base_url() . "img/delete.png>"?>
                    <?php echo anchor(base_url()."documents/delete/".$document->id . '=' . $document->file, $image) ?>&nbsp;&nbsp;
            <?php endforeach ?>
        </center>
        <?php $i++ ?>
    <?php endforeach ?>
</td>
</tr>

</table>
